'use strict';

angular.module('SystemManage')
.controller('OrgListController', ['$scope', 'BaseModule', 'BaseEnum', 'DataPushService','BaseFunction', 'Authentication',
    function($scope, BaseModule, BaseEnum, DataPushService, BaseFunction, Authentication) {
    	BaseModule.initModule($scope, 'Org');
        $scope.Module.Org.LoadMode = BaseEnum.LoadMode.CacheAndPaging;
        $scope.Module.Org.PageSize = 15;

        var condition = {
			ErpID: {
				"$gt": 0 
			}
		};

		$scope.Module.Org.Condition = condition;
  
        $scope.btnDataPush = function()
        {
			DataPushService.dataSync('UFIDA.U9.Base.Organization.Organization').then(function(result){
				BaseFunction.alert("数据同步", "数据同步成功");
			},function(err){
				BaseFunction.alert(err.message, err.title);
			});
        };
    }
]);